package com.cz.timi.controller;

import com.cz.timi.utils.TuLingUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author: ChengZhe
 * @Date: 2018/6/13 18:24
 */
@Controller
public class TuLingController {

    @RequestMapping({"/", "index"})
    public String index(){
        return "Chart";
    }

    @RequestMapping(value = "send",method = RequestMethod.POST)
    @ResponseBody
    public String sendMsg(String value){
        String result = TuLingUtil.getResult(value);
        System.out.println(result);
        return result;
    }

}
